<template>
  <div class="ad-form">
    <el-form size="mini" inline label-position="right" label-width="auto" ref="form" :model="form"  >
      <div class="ad-block">
        <el-row :gutter="10">
          <el-col :span="8">
            <el-form-item label="制单金额：" prop="createFee" :rules="[{required: true, message: '请输入'}]">
              <ad-input-number v-model="form.createFee" append="元" :precision="2"/>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="提短金额：" prop="pickFreeFee" :rules="[{required: true, message: '请输入'}]">
              <ad-input-number v-model="form.pickFreeFee" append="元" :precision="2"/>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="指派提车：" prop="pickFee" :rules="[{required: true, message: '请输入'}]">
              <ad-input-number v-model="form.pickFee" append="元" :precision="2"/>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="验车金额：" prop="verifyFee" :rules="[{required: true, message: '请输入'}]">
              <ad-input-number v-model="form.verifyFee" append="元" :precision="2"/>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="发运金额：" prop="transportFee" :rules="[{required: true, message: '请输入'}]">
              <ad-input-number v-model="form.transportFee" append="元" :precision="2"/>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="签收金额：" prop="signFee" :rules="[{required: true, message: '请输入'}]">
              <ad-input-number v-model="form.signFee" append="元" :precision="2"/>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="交付金额：" prop="deliveryFee" :rules="[{required: true, message: '请输入'}]">
              <ad-input-number v-model="form.deliveryFee" append="元" :precision="2"/>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="奖金基数：" prop="bonusBase" :rules="[{required: true, message: '请输入'}]">
              <ad-input-number v-model="form.bonusBase" append="元" :precision="2"/>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="提成基数：" prop="royaltyBase" :rules="[{required: true, message: '请输入'}]">
              <ad-input-number v-model="form.royaltyBase" append="元" :precision="2"/>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
    </el-form>
    <div class="op">
      <el-button type="primary" :loading="saving" @click="save">保 存</el-button>
      <el-button type="primary" plain @click="cancel">取 消</el-button>
    </div>
  </div>
</template>

<script>
import AdInputNumber from '@/components/AdInputNumber'
import adForm from '@/mixins/adForm'
import { edit, get } from '@/api/revenue'

class Form {}

export default {
  components: { AdInputNumber },
  mixins: [adForm({get, edit})],
  data() {
    return {
      form: new Form(),
    }
  }
}
</script>